//- Copyright (c) 2016 Lucky Byte, Inc.
if notify.notifications && notify.notifications.length > 0
  .comment.notify.notification
    .avatar
      i.big.icon.announcement.red
    .content
      .author 系统通知
      .text 您有 <em>#{notify.notifications.length} 条</em> 未读系统通知 ...
      .actions
        if userinfo.remove_notify
          a.reply.notification.clear(href="#") 全部删除
        else
          i.icon.ban.grey
          a.reply 全部删除
        a.reply#expand(href="#") 显示详情

      table.ui.table.celled.small.very.basic
        thead
          th.center.aligned.collapsing 序号
          th.center.aligned.collapsing 时 间
          th.center.aligned.collapsing 来 源
          th.center.aligned.collapsing 级 别
          th.center.aligned 内 容
          th.center.aligned.collapsing
        tbody
          each notification in notify.notifications
            - var tr_class = ''
            case notification.level
              when 2
                - tr_class = '#ff6600'
              when 3
                - tr_class = 'red'
              when 4
                - tr_class = '#ff0099'
              default
                - tr_class = ''

            tr(style="color:#{tr_class}")
              td.center.aligned.collapsing= notification.serial
              td.center.aligned.collapsing
                = notification.time.format('YYYY-MM-DD HH:mm:ss')
              td.center.aligned.collapsing= notification.sender
              case notification.level
                when 1
                  td.center.aligned.collapsing 信息
                when 2
                  td.center.aligned.collapsing 警告
                when 3
                  td.center.aligned.collapsing 错误
                when 4
                  td.center.aligned.collapsing 严重
                default
                  td.center.aligned.collapsing 未知
                  
              td= notification.message
              td.collapsing.center.aligned
                if userinfo.remove_notify
                  a.notification.delete(href="#"
                    data-serial="#{notification.serial}") 删除
